function eegetdropdownvalue(B) {
	if (B[0].type == "radio")
		return getvalue_radiobuttons(B, "number");
	else
		return B.selectedIndex >= 0 && B[B.selectedIndex] ? B[B.selectedIndex].value
				: 0
}
function getvalue_radiobuttons(F, G) {
	for ( var I, J = false, H = 0; H < F.length; H++)
		if (F[H].checked == true) {
			J = true;
			I = H;
			break
		}
	if (J == true)
		return F[I].value;
	else if (G == "text")
		return "";
	else
		return 0
}
function eegetdropdownvalue_str(B) {
	if (B[0].type == "radio")
		return getvalue_radiobuttons(B, "text");
	else
		return B.selectedIndex >= 0 && B[B.selectedIndex] ? B[B.selectedIndex].value
				: ""
}
function myIsNaN(B) {
	return isNaN(B) || typeof B == "number" && !isFinite(B)
}
function upper(B) {
	return B.toUpperCase()
}
function round(G, H) {
	if (isFinite(G) && isFinite(H)) {
		var F = G < 0 ? -1 : 1, I = Math.abs(G), J = Math.pow(10, H);
		return F * Math.round(I * J) / J
	} else
		return NaN
}
function s2n(D) {
	D = String(D).replace(eedecreg, ".");
	D = D.replace(eethreg, "");
	D = D.replace(eecurrencyreg, "");
	var C = parseFloat(D);
	if (myIsNaN(C))
		C = 0;
	if (D.search(eepercentreg) >= 0)
		C = C / 100;
	return C
}
function v2n(B) {
	switch (typeof B) {
	case "number":
		return B;
	case "string":
		return s2n(B);
	case "boolean":
		return B ? 1 : 0;
	case "object":
		if (B.constructor == Number)
			return B;
		if (B.constructor == String)
			return s2n(B);
		if (B.constructor == Boolean)
			return B ? 1 : 0;
		return Number.NaN;
	default:
		return Number.NaN
	}
}
var near0RegExp = new RegExp("[.](.*0000000|.*9999999)");
function eedisplayFloat(C) {
	if (myIsNaN(C))
		return Number.NaN;
	else {
		var D = String(C);
		if (near0RegExp.test(D)) {
			C = round(C, 8);
			D = String(C)
		}
		return D.replace(/\./g, eedec)
	}
}
var eeparseFloatVreg = new RegExp("^ *-?[0-9.]+ *$");
function eeparseFloatV(D) {
	if (D == "")
		return D;
	D = String(D).replace(eedecreg, ".");
	if (!eeparseFloatVreg.test(D))
		return D;
	var C = parseFloat(D);
	if (isNaN(C))
		return D;
	else
		return C
}
function onEnterPress(D) {
	document.onkeydown = C;
	function C(I) {
		var L, navigated = false;
		if (window.event)
			L = window.event.keyCode;
		else if (I)
			L = I.which;
		switch (L) {
		case 13:
		case 40:
			var K = document.getElementById(D).getAttribute("downkey");
			if (K != null)
				if (document.getElementById(K).getAttribute("readonly") == null
						|| document.getElementById(K).getAttribute("readonly") == false) {
					document.getElementById(K).select();
					navigated = true
				}
			var evtobj = window.event || I;
			evtobj.preventDefault && evtobj.preventDefault();
			break;
		case 37:
			var B = document.getElementById(D).getAttribute("leftkey");
			if (B != null)
				if (document.getElementById(B).getAttribute("readonly") == null
						|| document.getElementById(B).getAttribute("readonly") == false) {
					document.getElementById(B).select();
					navigated = true
				}
			break;
		case 38:
			var J = document.getElementById(D).getAttribute("upkey");
			if (J != null)
				if (document.getElementById(J).getAttribute("readonly") == null
						|| document.getElementById(J).getAttribute("readonly") == false) {
					document.getElementById(J).select();
					navigated = true
				}
			break;
		case 39:
			var A = document.getElementById(D).getAttribute("rightkey");
			if (A != null)
				if (document.getElementById(A).getAttribute("readonly") == null
						|| document.getElementById(A).getAttribute("readonly") == false) {
					document.getElementById(A).select();
					navigated = true
				}
			break;
		default:
			navigated = true;
			void 0
		}
		!navigated && recalc_onclick(D)
	}
}
function HandleCancel(B) {
	window.location = B
}
function SetRatingStart(A, B, C, D) {
	num = parseInt(A);
	if (C != "")
		document.getElementById(C).value = A;
	ii = 1;
	while (ii <= B) {
		if (ii <= num)
			document.getElementById(D + ii).className = "starActive";
		else
			document.getElementById(D + ii).className = "starComplete";
		ii++
	}
}
function getPageSize() {
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY
	} else if (document.body.scrollHeight > document.body.offsetHeight) {
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight
	} else {
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight
	}
	var windowWidth, windowHeight;
	if (self.innerHeight) {
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight
	} else if (document.documentElement
			&& document.documentElement.clientHeight) {
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight
	} else if (document.body) {
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight
	}
	if (yScroll < windowHeight)
		pageHeight = windowHeight;
	else
		pageHeight = yScroll;
	if (xScroll < windowWidth)
		pageWidth = windowWidth;
	else
		pageWidth = xScroll;
	var yScroll;
	if (self.pageYOffset)
		yScroll = self.pageYOffset;
	else if (document.documentElement && document.documentElement.scrollTop)
		yScroll = document.documentElement.scrollTop;
	else if (document.body)
		yScroll = document.body.scrollTop;
	arrayPageSize = [ pageWidth, pageHeight, windowWidth, windowHeight, yScroll ];
	return arrayPageSize
}
function checkcaptcha(B) {
	if (document.getElementById("txtcaptcha").value == document
			.getElementById("captchaid").innerHTML) {
		document.getElementById("xl_an").value = document
				.getElementById("txtcaptcha").value;
		if (submitted) {
			alert("You have already submitted the form.  Please be patient.");
			submitted = false;
			return false
		} else {
			recalc_onclick("");
			submitted = true;
			document.formc.submit();
			return true
		}
	} else {
		document.getElementById("errmsg").value = B;
		document.getElementById("light").style.display = "none";
		document.getElementById("fade").style.display = "none";
		check_submit()
	}
}
function GenerateCaptID() {
	randomNum = Math.floor(Math.random() * 8888 + 1e3);
	document.getElementById("captchaid").innerHTML = randomNum;
	document.getElementById("xl_ex").value = randomNum
}
function CancelCaptcha() {
	document.getElementById("light").style.display = "none";
	document.getElementById("fade").style.display = "none"
}
function CancelCaptchaalert() {
	document.getElementById("lightalert").style.display = "none";
	document.getElementById("fadealert").style.display = "none"
}
var ControlToFocus;
function checkrequired(reqlist, frompanel) {
	for ( var focussed = false, statusfunc = false, reqvalue, reqctrl, panelname, elementid, starid, ll = 0; ll < reqlist.length; ll++) {
		reqvalue = reqlist[ll].split("^");
		reqctrl = reqvalue[1];
		panelname = reqvalue[0];
		if (frompanel === "nopanel") {
			elementid = document.getElementById(reqctrl);
			if (elementid != null) {
				starid = reqctrl;
				if (elementid.type === "text" || elementid.type === "textarea")
					if (strtrim(elementid.value) === "0"
							|| strtrim(elementid.value) === "") {
						statusfunc = true;
						document.getElementById(starid).style.border = "1px solid red";
						document.getElementById("panelidz").value = panelname
								.substring(5);
						if (!focussed) {
							ControlToFocus = document.getElementById(starid);
							focussed = true
						}
					} else
						document.getElementById(starid).style.border = "";
				else if (elementid.type === "select-one")
					if (elementid.selectedIndex === 0) {
						statusfunc = true;
						document.getElementById("" + starid + "ssc").style.border = "1px inset red";
						document.getElementById("panelidz").value = panelname
								.substring(5);
						if (!focussed) {
							ControlToFocus = document.getElementById(""
									+ starid + "ssc");
							focussed = true
						}
					} else
						document.getElementById("" + starid + "ssc").style.border = "0px";
				else if (elementid == null || elementid.type == "radio"
						|| elementid.type == undefined) {
					var staridradio, radioelem, innerstatusfunc, rad;
					staridradio = reqctrl;
					radioid = reqctrl.substring(8);
					radioelem = document.getElementsByName(radioid);
					innerstatusfunc = false;
					for (rad = 0; rad < radioelem.length; rad++)
						if (radioelem[rad].checked) {
							innerstatusfunc = true;
							break
						}
					if (innerstatusfunc === false) {
						statusfunc = true;
						document.getElementById("panelidz").value = panelname
								.substring(5);
						document.getElementById(staridradio).style.border = "1px inset red";
						if (!focussed) {
							ControlToFocus = document
									.getElementById(staridradio);
							focussed = true
						}
					} else
						document.getElementById(staridradio).style.border = "0px"
				}
			}
		} else if (frompanel === panelname) {
			var elementid = document.getElementById(reqctrl);
			if (elementid != null) {
				var starid = reqctrl;
				if (elementid.type === "text" || elementid.type === "textarea")
					if (strtrim(elementid.value) === "0"
							|| strtrim(elementid.value) === "") {
						statusfunc = true;
						document.getElementById(starid).style.border = "1px inset red";
						if (!focussed) {
							ControlToFocus = document.getElementById(starid);
							focussed = true
						}
					} else
						document.getElementById(starid).style.border = "";
				else if (elementid.type === "select-one")
					if (elementid.selectedIndex === 0) {
						statusfunc = true;
						document.getElementById("" + starid + "ssc").style.border = "1px solid red";
						if (!focussed) {
							ControlToFocus = document.getElementById(""
									+ starid + "ssc");
							focussed = true
						}
					} else
						document.getElementById("" + starid + "ssc").style.border = "0px";
				else if (elementid == null || elementid.type == "radio"
						|| elementid.type == undefined) {
					var staridradio, radioelem, innerstatusfunc, rad;
					staridradio = reqctrl;
					radioid = reqctrl.substring(8);
					radioelem = document.getElementsByName(radioid);
					innerstatusfunc = false;
					for (rad = 0; rad < radioelem.length; rad++)
						if (radioelem[rad].checked) {
							innerstatusfunc = true;
							break
						}
					if (innerstatusfunc === false) {
						statusfunc = true;
						document.getElementById(staridradio).style.border = "1px inset red";
						if (!focussed) {
							ControlToFocus = document
									.getElementById(staridradio);
							focussed = true
						}
					} else
						document.getElementById(staridradio).style.border = "0px"
				}
			}
		}
	}
	return statusfunc;
}
function strtrim(val) {
	return val.replace(/^\s+/, "").replace(/\s+$/, "");
}
function CookieExpiryDate(B, A) {
	B.setMonth(B.getMonth() + A);
	return B;
}
function GetPageName() {
	//var A = window.location.pathname, B = A.substring(A.lastIndexOf("/") + 1);
	//return B;
	return "poll.jsp";
}